package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelPriceComparatorDescending implements Comparator<Hotel> {
	
	private static HotelPriceComparatorDescending hotelPriceComparatorDescending = new HotelPriceComparatorDescending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel2.getPrice()-hotel1.getPrice();
	}
	
	private HotelPriceComparatorDescending(){
		
	}
	
	public static HotelPriceComparatorDescending getInstance(){
		return hotelPriceComparatorDescending;
	}	

}
